package com.yuan.algorithms.Algorithm_1;

import java.util.Scanner;

public class 分数矩阵 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            if (n == 0) {
                break;
            }
            double s = n;
            for (int i = 2; i <= n; i++) {
                s += (1.0 / i) * (n - i + 1) * 2;
            }
            System.out.printf("%.2f", s);
            System.out.println();
        }

    }

}
